* ACTIVATING ANIMUS:  THE UNIQUELY SOCIAL ROOTS OF TRUMP SUPPORT
**Mason, Wronski, and Kane 2021
**REPLICATION CODE for Supplemental Appendix

clear
**load data from "https://www.voterstudygroup.org/publication/2018-voter-survey-1"
use "VOTER_Survey_April18_Release1.dta"


**Add Variable Lables
label var TrumpPresApproval1701 "Trump Approval 2017"
label var rr_demgroupsFT11 "Democratic Groups Animosity 2011"
label var pid7_baseline_clean_01 "Party ID 2011"
label var Ideo_baseline_cleaned_01 "Ideology 2011"
label var educ_baseline "Education 2011"
label var race_baseline "Race 2011" 
label var religpew_baseline "Religion 2011" 
label var age2011decades "Age in decades 2011"
label var female_baseline "Female 2011"
label var faminc_baseline_clean_01 "Income 2011"
label var rr_polinterest_baseline_01 "Political Interest 2011"


**Table A1. Group Animus Item Correlations
asdoc pwcorr rr_demgroupsFT11 rr_gopgroupsFT11 rr_BlackFT11_01 rr_HispFT11_01 rr_MuslimFT11_01 rr_GaysLesbiansFT11_01 WhiteFT11_01 ChristiansFT11_01 pid7_baseline_clean_01 Ideo_baseline_cleaned_01, star(.05) replace 

**Figure A1a. Trump Approval 2017
reg TrumpPresApproval1701 rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A1a_full

reg TrumpPresApproval1701 rr_demgroupsFT11, robust 
estimates store A1a_bi

coefplot A1a_full A1a_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")
	
	
**Figure A1b. Trump Favorability 2017
reg Trumpfav1701 rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A1b_full

reg Trumpfav1701 rr_demgroupsFT11, robust 
estimates store A1b_bi

coefplot A1b_full A1b_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
	
**Figure A1c. Trump Approval 2018
reg TrumpPresApproval1801 rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A1c_full

reg TrumpPresApproval1801 rr_demgroupsFT11, robust 
estimates store A1c_bi

coefplot A1c_full A1c_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")		
	
	
**Figure A1d. Trump Favorability 2018
reg Trumpfav1801 rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A1d_full

reg Trumpfav1801 rr_demgroupsFT11, robust 
estimates store A1d_bi

coefplot A1d_full A1d_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
	
**Figure A2a. Paul Ryan Favorability 2018	
reg Ryanfav1801  rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A2a_full

reg Ryanfav1801  rr_demgroupsFT11, robust
estimates store A2a_bi

coefplot A2a_full A2a_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	

**Figure A2b. Mitch McConnell Favorability 2018	
reg Mcconfav1801  rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A2b_full

reg Mcconfav1801  rr_demgroupsFT11, robust
estimates store A2b_bi

coefplot A2b_full A2b_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")		
	
**Figure A2c. Republican Party Favorability 2017
reg GOPFT17_01  rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A2c_full

reg GOPFT17_01  rr_demgroupsFT11, robust
estimates store A2c_bi

coefplot A2c_full A2c_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")		

	
**Figure A2d. Bernie Sanders Favorability 2018
reg Sandersfav1801  rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A2d_full

reg Sandersfav1801  rr_demgroupsFT11, robust
estimates store A2d_bi

coefplot A2d_full A2d_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")		
	
**Figure A3. Trump Support & Animus Democratic Groups by PID
reg Trumpfav1801  c.rr_demgroupsFT11##i.pid_baseline3 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A3_full

reg Trumpfav1801  c.rr_demgroupsFT11##i.pid_baseline3, robust
estimates store A3_bi

coefplot A3_full A3_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
**Figure A4a. Hillary Clinton Favorability 2018
reg Clintonfav1801  rr_gopgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A4a_full

reg Clintonfav1801  rr_gopgroupsFT11, robust
estimates store A4a_bi

coefplot A4a_full A4a_bi, xline(0) legend(off) ///
	coeflabels (rr_gopgroupsFT11 = "{bf: Republican Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	

**Figure A4b. Bernie Sanders Favorability 2018
reg Sandersfav1801  rr_gopgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A4b_full

reg Sandersfav1801  rr_gopgroupsFT11, robust
estimates store A4b_bi

coefplot A4b_full A4b_bi, xline(0) legend(off) ///
	coeflabels (rr_gopgroupsFT11 = "{bf: Republican Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
**Figure A4c. Nancy Pelosi Favorability 2018
reg Pelosifav1801  rr_gopgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A4c_full

reg Pelosifav1801  rr_gopgroupsFT11, robust
estimates store A4c_bi

coefplot A4c_full A4c_bi, xline(0) legend(off) ///
	coeflabels (rr_gopgroupsFT11 = "{bf: Republican Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
**Figure A4d. Chuck Shumer Favorability 2018
reg Schumerfav1801  rr_gopgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A4d_full

reg Schumerfav1801  rr_gopgroupsFT11, robust
estimates store A4d_bi

coefplot A4d_full A4d_bi, xline(0) legend(off) ///
	coeflabels (rr_gopgroupsFT11 = "{bf: Republican Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
**Figure A4e. Democratic Party Favorability 2017
reg DemFT17_01  rr_gopgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A4e_full

reg DemFT17_01  rr_gopgroupsFT11, robust
estimates store A4e_bi

coefplot A4e_full A4e_bi, xline(0) legend(off) ///
	coeflabels (rr_gopgroupsFT11 = "{bf: Republican Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	

**Figure A5. Non-linear 2018 Trump support and Democratic Group Animus
reg Trumpfav1801  c.rr_demgroupsFT11##c.rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A5_full

reg Trumpfav1801  c.rr_demgroupsFT11##c.rr_demgroupsFT11, robust
estimates store A5_bi


coefplot A5_full A5_bi, xline(0) legend(off) ///
	coeflabels (rr_demgroupsFT11 = "{bf: Democratic Groups Animosity 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
**Figure A6a. Trump support 2018 & Blacks Animosity (Linear)
reg Trumpfav1801  c.rr_BlackFT11_01 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust
estimates store A6a_full

reg Trumpfav1801  c.rr_BlackFT11_01, robust
estimates store A6a_bi


coefplot A6a_full A6a_bi, xline(0) legend(off) ///
	coeflabels (rr_BlackFT11_01 = "{bf: Animosity Toward Blacks 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	


**Figure A6b. Trump support 2018 & Blacks Animosity (Non-Linear)
reg Trumpfav1801  c.rr_BlackFT11_01##c.rr_BlackFT11_01 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust
estimates store A6b_full

reg Trumpfav1801  c.rr_BlackFT11_01##c.rr_BlackFT11_01 , robust
estimates store A6b_bi


coefplot A6b_full A6b_bi, xline(0) legend(off) ///
	coeflabels (rr_BlackFT11_01 = "{bf: Animosity Toward Blacks 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
	
**Figure A6c. Trump support 2018 & Hispanics Animosity (Linear)	
reg Trumpfav1801  c.rr_HispFT11_01 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A6c_full

reg Trumpfav1801  c.rr_HispFT11_01, robust
estimates store A6c_bi

coefplot A6c_full A6c_bi, xline(0) legend(off) ///
	coeflabels (rr_HispFT11_01 = "{bf: Animosity Toward Hispanics 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	

**Figure A6d. Trump support 2018 & Hispanics Animosity (Non-Linear)	
reg Trumpfav1801 c.rr_HispFT11_01##c.rr_HispFT11_01 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A6d_full

reg Trumpfav1801   c.rr_HispFT11_01##c.rr_HispFT11_01, robust
estimates store A6d_bi

coefplot A6d_full A6d_bi, xline(0) legend(off) ///
	coeflabels (rr_HispFT11_01 = "{bf: Animosity Toward Hispanics 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
	
**Figure A6e. Trump support 2018 & Muslims Animosity (Linear)	
reg Trumpfav1801  c.rr_MuslimFT11_01 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A6e_full

reg Trumpfav1801   c.rr_MuslimFT11_01, robust
estimates store A6e_bi

coefplot A6e_full A6e_bi, xline(0) legend(off) ///
	coeflabels (rr_MuslimFT11_01 = "{bf: Animosity Toward Muslims 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
**Figure A6f. Trump support 2018 & Muslims Animosity (Non-Linear)	
reg Trumpfav1801  c.rr_MuslimFT11_01##c.rr_MuslimFT11_01 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A6f_full

reg Trumpfav1801  c.rr_MuslimFT11_01##c.rr_MuslimFT11_01, robust
estimates store A6f_bi

coefplot A6f_full A6f_bi, xline(0) legend(off) ///
	coeflabels (rr_MuslimFT11_01 = "{bf: Animosity Toward Muslims 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	
	
**Figure A6g. Trump support 2018 & Gays/Lesbians Animosity (Linear)	
reg Trumpfav1801  c.rr_GaysLesbiansFT11_01 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A6g_full

reg Trumpfav1801  c.rr_GaysLesbiansFT11_01 , robust
estimates store A6g_bi

coefplot A6g_full A6g_bi, xline(0) legend(off) ///
	coeflabels (rr_GaysLesbiansFT11_01 = "{bf: Animosity Toward Gays/Lesbians 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")	

	
**Figure A6h. Trump support 2018 & Gays/Lesbians Animosity (Non-Linear)	
reg Trumpfav1801  c.rr_GaysLesbiansFT11_01##c.rr_GaysLesbiansFT11_01 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store A6h_full

reg Trumpfav1801  c.rr_GaysLesbiansFT11_01##c.rr_GaysLesbiansFT11_01 , robust
estimates store A6h_bi

coefplot A6h_full A6h_bi, xline(0) legend(off) ///
	coeflabels (rr_GaysLesbiansFT11_01 = "{bf: Animosity Toward Gays/Lesbians 2011}" pid7_baseline_clean_01 = "Party ID 2011" ///
	_cons = "constant")		

	
	
**Figure B: Party-Specific Effects by Democratic Sub-Group
**African-Americans
reg Trumpfav1801  c.rr_BlackFT11_01##i.pid_baseline3 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust
margins, dydx(rr_BlackFT11_01) at(pid_baseline3=(1 2 3)) atmeans
margins, at(rr_BlackFT11_01=(0 (.1) 1) pid_baseline3=(1 2 3)) atmeans 
marginsplot, xtitle ("Animus Toward African-Americans (2011)") saving(g1, replace)

**Hispanics
reg Trumpfav1801  c.rr_HispFT11_01##i.pid_baseline3 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust
margins, dydx(rr_HispFT11_01) at(pid_baseline3=(1 2 3)) atmeans
margins, at(rr_HispFT11_01=(0 (.1) 1) pid_baseline3=(1 2 3)) atmeans 
marginsplot, xtitle ("Animus Toward Hispanics (2011)") saving(g2, replace)

**Muslims
reg Trumpfav1801  c.rr_MuslimFT11_01##i.pid_baseline3 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust
margins, dydx(rr_MuslimFT11_01) at(pid_baseline3=(1 2 3)) atmeans
margins, at(rr_MuslimFT11_01=(0 (.1) 1) pid_baseline3=(1 2 3)) atmeans 
marginsplot, xtitle ("Animus Toward Muslims (2011)") saving(g3, replace)

**LGBT
reg Trumpfav1801  c.rr_GaysLesbiansFT11_01##i.pid_baseline3 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust
margins, dydx(rr_GaysLesbiansFT11_01) at(pid_baseline3=(1 2 3)) atmeans
margins, at(rr_GaysLesbiansFT11_01=(0 (.1) 1) pid_baseline3=(1 2 3)) atmeans
marginsplot, xtitle ("Animus Toward LGBT (2011)") saving(g4, replace)

graph combine "g1.gph" "g2.gph" "g3.gph" "g4.gph" 

**FIGURE C: Trump 2016 v. 2018
gen Trumpfav16_01=fav_trump_2016
recode Trumpfav16_01 8=.
omscore Trumpfav16_01
replace Trumpfav16_01=(rr_Trumpfav16_01-1)/3

*Figure C1:  Trump 2016 vs. 2018  Linear Model

reg Trumpfav1801  rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store Trump18

reg Trumpfav16_01  rr_demgroupsFT11 pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store Trump16

coefplot Trump18 Trump16, drop(_cons) xline(0) levels(95) scheme (plotplain) ///
legend(ring(1) pos(6) col(2)) 


*Figure C2: Trump 2016 vs. 2018  Nonlinear Model
gen rr_demgroupsFT11_squared=rr_demgroupsFT11*rr_demgroupsFT11
label var rr_demgroupsFT11_squared "Democratic Group Animosity 2011{sup:2}"

reg Trumpfav1801  rr_demgroupsFT11 rr_demgroupsFT11_squared pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store Trump18q

reg Trumpfav16_01  rr_demgroupsFT11 rr_demgroupsFT11_squared pid7_baseline_clean_01 Ideo_baseline_cleaned_01 /// 
i.educ_baseline i.race_baseline i.religpew_baseline age2011decades female_baseline faminc_baseline_clean_01 rr_polinterest_baseline_01, robust 
estimates store Trump16q

coefplot Trump18q Trump16q, drop(_cons) xline(0) levels(95) scheme (plotplain) ///
legend(ring(1) pos(6) col(2))



